package xin.ryven.workflow.service;

import xin.ryven.workflow.model.ApprovalHistory;
import xin.ryven.workflow.model.ProcessRequest;
import xin.ryven.workflow.model.FormField;
import org.camunda.bpm.engine.task.Task;
import java.util.List;
import java.util.Map;

public interface ProcessService {
    ProcessRequest startProcess(String processDefinitionId, Map<String, Object> variables);
    ProcessRequest getProcessById(Long id);
    List<ProcessRequest> getMyRequests(Long userId);
    List<Task> getMyTasks(String userId);
    void completeTask(String taskId, Map<String, Object> variables);
    Map<String, Object> getTaskFormData(String taskId);
    Map<String, Object> getProcessVariables(String processInstanceId);
    void saveProcessDefinition(String key, String bpmnXml);
    void updateProcessDefinition(String id, String key, String bpmnXml);
    String getProcessDefinitionXml(String deploymentId);
    Map<String, Object> getProcessFormConfig(String processDefinitionId);
    void saveProcessFormConfig(String processDefinitionId, List<FormField> fields);
    List<ApprovalHistory> getProcessHistory(String processInstanceId);
    Map<String, Object> getProcessInstanceDetails(String processInstanceId);
} 